package com.example.springbootfirst.exception;

import lombok.Data;

/**
 * created by Morgan on 2021/9/30
 */
@Data
public class BaseException extends RuntimeException {
    private final String code;
    private final String msg;
    private final Throwable throwable;

    public BaseException() {
        this(null,null,null);
    }

    public BaseException(String code, String msg) {
        this(code,msg,null);
    }

    public BaseException(String code, String msg, Throwable throwable) {
        this.code = code;
        this.msg = msg;
        this.throwable = throwable;
    }
}
